"""查看线索页面"""
from page.base_page import BasePage
from selenium.webdriver.common.by import By

class ViewPage(BasePage):

    url = '/crm5/index.php?m=leads&a=view&id=1845'

    #定位器
    # 转换为客户
    custom_add_locator = (By.CSS_SELECTOR, '#right_list > ul > li:nth-child(6) > a')

    def click_switch_to_customer(self):
        """点击转换为客户"""
        self.driver.find_element(*self.custom_add_locator).click()

    def get_current_url(self):
        """获取当前页面url"""
        return self.driver.current_url


